package org.snail;

//群分类的类型
public enum GroupTypeEnum {
    DINGDING_CREAT("钉钉自建群", 1),
    DINGDING_AUTO("钉钉正式群",2),
    ADMINISTRATOR_GROUP("管理员群组", 3);

    private String key;  //对应的中文名称
    private int value;   //所包含的数值

    private GroupTypeEnum(String key, int value) {
        this.key = key;
        this.value = value;
    }


    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public static void main(String[] args) {
        GroupTypeEnum[] values = GroupTypeEnum.values();

//        System.out.println(values);

        GroupTypeEnum groupTypeEnum = GroupTypeEnum.valueOf("ADMINISTRATOR_GROUP");
        System.out.println("===========" + groupTypeEnum.getKey() +"========" + groupTypeEnum.getValue());
    }

    @Override
    public String toString() {
        return "GroupTypeEnum{" + "key='" + key + '\'' + ", value=" + value + '}';
    }
}
